home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.42 / includes3v1 / includes3v1.lha / Exec / Devices.i < prev    next >
Text File  |  1994-12-04  |  938b  |  51 lines

  1.  
  2. {
  3.     exec/devices.i
  4. }
  5.  
  6. {$I "Include:exec/libraries.i" }
  7. {$I "Include:exec/ports.i"     }
  8.  
  9. TYPE
  10.  
  11. {***** Device *****************************************************}
  12.  
  13.   Device = record
  14.     dd_Library : Library;
  15.   end;
  16.   DevicePtr = ^Device;
  17.  
  18. {***** Unit *******************************************************}
  19.  
  20. Unit = record
  21.     unit_MsgPort : MsgPort;        { queue for unprocessed messages }
  22.                     { instance of msgport is recommended }
  23.     unit_flags,
  24.     unit_pad     : Byte;
  25.     unit_OpenCnt : Short;        { number of active opens }
  26. end;
  27.  
  28. Const
  29.   UNITF_ACTIVE    = %00000001;
  30.   UNITF_INTASK    = %00000010;
  31.  
  32.  
  33.  
  34.  
  35.  
  36. Procedure AddDevice(device : DevicePtr);
  37.     External;
  38.  
  39. Procedure CloseDevice(io : Address);    { io is an IORequestPtr }
  40.     External;
  41.  
  42. Function OpenDevice(devName : String; unitNumber : Integer;
  43.             io : Address; flags : Integer) : Integer;
  44.     External;    { io is an IORequestPtr }
  45.  
  46. Procedure RemDevice(device : DevicePtr);
  47.     External;
  48.  
  49.  
  50.  
  51.